#pragma once
#include <mutex>
#include "videostream_common.h"

class VSRTSPClient;
class UsageEnvironment;
class BasicTaskScheduler;

class VStream {
public: 
    VStream();
    virtual ~VStream();
	int OpenCamera(char const* rtspURL, char const* sUser, char const* sPasswd);
	int Close();
	int GetFrameData(cv::Mat* frame);
	int State();

private:
	void startDoEventLoop();

private:
	VSRTSPClient*	     m_pRtspClient;
	UsageEnvironment*    m_pEnv;
	BasicTaskScheduler*  m_pScheduler;
	char				 eventLoopWatchVariable;
};
